using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace Models
{
    public partial class KQCMS : DbContext
    {
        public KQCMS()
            : base("name=KQCMS")
        {
        }

        public virtual DbSet<CMS_Article> CMS_Article { get; set; }
        public virtual DbSet<CMS_Category> CMS_Category { get; set; }
        public virtual DbSet<CMS_Comment> CMS_Comment { get; set; }
        public virtual DbSet<CMS_Keyword> CMS_Keyword { get; set; }
        public virtual DbSet<CMS_User> CMS_User { get; set; }
        public virtual DbSet<View_ArticleUC> View_ArticleUC { get; set; }
        public virtual DbSet<View_CommentAU> View_CommentAU { get; set; }

        public virtual DbSet<View_Article> View_Article { get; set; }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<CMS_Article>()
                .Property(e => e.title)
                .IsUnicode(false);

            modelBuilder.Entity<CMS_Article>()
                .Property(e => e.author)
                .IsUnicode(false);

            modelBuilder.Entity<CMS_Article>()
                .Property(e => e.ahtml)
                .IsUnicode(false);

            modelBuilder.Entity<CMS_Category>()
                .Property(e => e.ctitle)
                .IsUnicode(false);

            modelBuilder.Entity<CMS_Category>()
                .Property(e => e.cname)
                .IsUnicode(false);

            modelBuilder.Entity<CMS_Keyword>()
                .Property(e => e.keyword)
                .IsUnicode(false);

            modelBuilder.Entity<CMS_User>()
                .Property(e => e.Uname)
                .IsUnicode(false);

            modelBuilder.Entity<CMS_User>()
                .Property(e => e.upwd)
                .IsUnicode(false);

            modelBuilder.Entity<CMS_User>()
                .Property(e => e.mobile)
                .IsUnicode(false);

            modelBuilder.Entity<View_ArticleUC>()
                .Property(e => e.title)
                .IsUnicode(false);

            modelBuilder.Entity<View_ArticleUC>()
                .Property(e => e.author)
                .IsUnicode(false);

            modelBuilder.Entity<View_ArticleUC>()
                .Property(e => e.ahtml)
                .IsUnicode(false);

            modelBuilder.Entity<View_ArticleUC>()
                .Property(e => e.ctitle)
                .IsUnicode(false);

            modelBuilder.Entity<View_ArticleUC>()
                .Property(e => e.cname)
                .IsUnicode(false);

            modelBuilder.Entity<View_ArticleUC>()
                .Property(e => e.Uname)
                .IsUnicode(false);

            modelBuilder.Entity<View_ArticleUC>()
                .Property(e => e.mobile)
                .IsUnicode(false);

            modelBuilder.Entity<View_CommentAU>()
                .Property(e => e.title)
                .IsUnicode(false);

            modelBuilder.Entity<View_CommentAU>()
                .Property(e => e.author)
                .IsUnicode(false);

            modelBuilder.Entity<View_CommentAU>()
                .Property(e => e.ahtml)
                .IsUnicode(false);

            modelBuilder.Entity<View_CommentAU>()
                .Property(e => e.Uname)
                .IsUnicode(false);

            modelBuilder.Entity<View_CommentAU>()
                .Property(e => e.mobile)
                .IsUnicode(false);

            modelBuilder.Entity<View_Article>()
                .Property(e => e.title)
                .IsUnicode(false);

            modelBuilder.Entity<View_Article>()
                .Property(e => e.author)
                .IsUnicode(false);

            modelBuilder.Entity<View_Article>()
                .Property(e => e.ahtml)
                .IsUnicode(false);

            modelBuilder.Entity<View_Article>()
                .Property(e => e.Uname)
                .IsUnicode(false);

            modelBuilder.Entity<View_Article>()
                .Property(e => e.cname)
                .IsUnicode(false);

            modelBuilder.Entity<View_Article>()
                .Property(e => e.ctitle)
                .IsUnicode(false);

            modelBuilder.Entity<View_Article>()
                .Property(e => e.upwd)
                .IsUnicode(false);

            modelBuilder.Entity<View_Article>()
                .Property(e => e.mobile)
                .IsUnicode(false);
        }
    }
}
